/**
 * Copyright &copy; 2012-2014 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.employee.entity;

import org.hibernate.validator.constraints.Length;

import com.thinkgem.jeesite.modules.sys.entity.Office;

import javax.validation.constraints.NotNull;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.thinkgem.jeesite.common.persistence.DataEntity;
import com.thinkgem.jeesite.common.utils.excel.annotation.ExcelField;

/**
 * 人事信息管理Entity
 * 
 * @author hui.li
 * @version 2017-07-15
 */
public class Employee extends DataEntity<Employee> {

    private static final long serialVersionUID = 1L;
    private String            number;               // 工号
    private String            name;                 // 姓名
    private Office            company;              // 国家
    private Office            office;               // 仓库
    private String            department;           // 部门
    private String            type;                 // 员工类型
    private String            outsourcingCompany;   // 外包公司
    private Date              entryDate;            // 入职日期
    private String            position;             // 职位
    private String            rank;                 // 职级
    private String            hourlyStandard;       // 时薪标准
    private String            vatRate;              // 增值税率
    private Date              leaveDate;            // 离职日期
    private Date              beginEntryDate;       // 开始 入职日期
    private Date              endEntryDate;         // 结束 入职日期
    private int               exception;            // 是否
    private int               late;                 // 是否迟到
    private int               noLate;               // 是否早退
    private String shiftId;//班次ID
  

	public Employee(){
        super();
    }

    public Employee(String id){
        super(id);
    }

    @NotNull(message = "国家不能为空")
    @ExcelField(title = "国家", type = 0, align = 2, sort = 1)
    public Office getCompany() {
        return company;
    }

    public void setCompany(Office company) {
        this.company = company;
    }

    @NotNull(message = "仓库不能为空")
    @ExcelField(title = "仓库", type = 0, align = 2, sort = 2)
    public Office getOffice() {
        return office;
    }

    public void setOffice(Office office) {
        this.office = office;
    }

    @Length(min = 1, max = 100, message = "部门长度必须介于 1 和 100 之间")
    @ExcelField(title = "部门", type = 0, align = 2, sort = 3, dictType="department_type")
    public String getDepartment() {
        return department;
    }

    public void setDepartment(String department) {
        this.department = department;
    }

    @Length(min = 1, max = 100, message = "姓名长度必须介于 1 和 100 之间")
    @ExcelField(title = "姓名", type = 0, align = 2, sort = 4)
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Length(min = 1, max = 100, message = "员工类型长度必须介于 1 和 100 之间")
    @ExcelField(title = "员工类别", type = 0, align = 2, sort = 5, dictType="employee_type")
    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    @Length(min = 0, max = 100, message = "外包公司长度必须介于 0 和 100 之间")
    @ExcelField(title = "外包公司", type = 0, align = 2, sort = 6, dictType="outsourcing_company_type")
    public String getOutsourcingCompany() {
        return outsourcingCompany;
    }

    public void setOutsourcingCompany(String outsourcingCompany) {
        this.outsourcingCompany = outsourcingCompany;
    }

    @Length(min = 1, max = 100, message = "工号长度必须介于 1 和 100 之间")
    @ExcelField(title = "工号", type = 0, align = 2, sort = 7)
    public String getNumber() {
        return number;
    }

    public void setNumber(String number) {
        this.number = number;
    }

    @JsonFormat(pattern = "yyyy-MM-dd")
    @NotNull(message = "入职日期不能为空")
    @ExcelField(title = "入职日期", type = 0, align = 2, sort = 8)
    public Date getEntryDate() {
        return entryDate;
    }

    public void setEntryDate(Date entryDate) {
        this.entryDate = entryDate;
    }

    @Length(min = 1, max = 64, message = "职位长度必须介于 1 和 64 之间")
    @ExcelField(title = "职位", type = 0, align = 2, sort = 9, dictType="position_type")
    public String getPosition() {
        return position;
    }

    public void setPosition(String position) {
        this.position = position;
    }

    @Length(min = 1, max = 64, message = "职级长度必须介于 1 和 64 之间")
    @ExcelField(title = "职级", type = 0, align = 2, sort = 10, dictType="rank_type")
    public String getRank() {
        return rank;
    }

    public void setRank(String rank) {
        this.rank = rank;
    }

    @ExcelField(title = "时薪标准", type = 0, align = 2, sort = 11)
    public String getHourlyStandard() {
        return hourlyStandard;
    }

    public void setHourlyStandard(String hourlyStandard) {
        this.hourlyStandard = hourlyStandard;
    }

    @ExcelField(title = "增值税率", type = 0, align = 2, sort = 12)
    public String getVatRate() {
        return vatRate;
    }

    public void setVatRate(String vatRate) {
        this.vatRate = vatRate;
    }

    @JsonFormat(pattern = "yyyy-MM-dd")
    @ExcelField(title = "离职日期", type = 0, align = 2, sort = 13)
    public Date getLeaveDate() {
        return leaveDate;
    }

    public void setLeaveDate(Date leaveDate) {
        this.leaveDate = leaveDate;
    }

    public Date getBeginEntryDate() {
        return beginEntryDate;
    }

    public void setBeginEntryDate(Date beginEntryDate) {
        this.beginEntryDate = beginEntryDate;
    }

    public Date getEndEntryDate() {
        return endEntryDate;
    }

    public void setEndEntryDate(Date endEntryDate) {
        this.endEntryDate = endEntryDate;
    }

    public int getException() {
        return exception;
    }

    public void setException(int exception) {
        this.exception = exception;
    }

    public int getLate() {
        return late;
    }

    public void setLate(int late) {
        this.late = late;
    }

    public int getNoLate() {
        return noLate;
    }

    public void setNoLate(int noLate) {
        this.noLate = noLate;
    }
    public String getShiftId() {
  		return shiftId;
  	}

  	public void setShiftId(String shiftId) {
  		this.shiftId = shiftId;
  	}
}
